<script setup lang="ts">
import { ref } from 'vue'
import Drawer from './Drawer.vue'

const showDrawer = ref(false)

const onClose = () => {
  console.log('抽屉已关闭')
}
</script>

<template>
  <div>
    <button @click="showDrawer = true">打开抽屉</button>
    <Drawer
        v-model:visible="showDrawer"
        placement="right"
        :duration="500"
        thickness="400px"
        title="自定义标题"
        @close="onClose"
    >
      <p>这是抽屉内容</p>
    </Drawer>
  </div>
</template>
